' 3. Properties are usable within VBscript, eg FRED.Width
' Property Rows() As Long
' Attribute Rows.VB_Description = "Determines the total number of columns or rows in a FlexGrid."
' Property Cols() As Long
' Attribute Cols.VB_Description = "Determines the total number of columns or rows in a FlexGrid."
' Property Row() As Long
' Attribute Row.VB_Description = "Returns/sets the active cell in a FlexGrid. Not available at design time."
' Property Col() As Long
' Attribute Col.VB_Description = "Returns/sets the active cell in a FlexGrid. Not available at design time."
' Property TextMatrix(Row As Variant, Col As Variant) As String
' Attribute Text.VB_Description = "Returns/sets the value of the specified cell in a FlexGrid. Not available at design time."
' Property Text() As String
' Attribute Text.VB_Description = "Returns/sets the value of the active cell in a FlexGrid. Not available at design time."
' Property TextArray(Index As Variant) As String
' Attribute Text.VB_Description = "Returns/sets the value of the active cell in a FlexGrid. Not available at design time."
' Property FixedRows() As Long
' Attribute FixedRows.VB_Description = "Returns/sets the total number of fixed (non-scrollable) columns or rows for a FlexGrid."
' Property FixedCols() As Long
' Attribute FixedCols.VB_Description = "Returns/sets the total number of fixed (non-scrollable) columns or rows for a FlexGrid."
' Property FormatString() As String
' Attribute FormatString.VB_Description = "Allows you to set up a FlexGrid's column widths, alignments, and fixed row and column text at design time. See the help file for details."
' Property Font() As Font
' Attribute Font.VB_Description = "Returns/sets the default font Object attributes for individual cells."
' Property RowIsVisible(Index As Variant) As Boolean
' Property TopRow() As Long
' Attribute TopRow.VB_Description = "Returns/sets the uppermost row *displayed* in the FlexGrid. Not available at design time."
' Property LeftCol() As Long
' Attribute LeftCol.VB_Description = "Returns/sets the leftmost visible column *displayed* (other than a fixed column) in the FlexGrid. Not available at design time."
' Property AllowBigSelection() As Boolean
' Attribute AllowBigSelection.VB_Description = "Returns/sets whether clicking on a column or row header should cause the entire column or row to be selected."
' Property AllowUserResizing() As AllowUserResizeSettings
' Attribute AllowUserResizing.VB_Description = "Returns/sets whether the user should be allowed to resize rows and columns with the mouse."
' Property Appearance() As AppearanceSettings
' Attribute Appearance.VB_Description = "Returns/sets whether a control should be painted with 3-D effects."
' Property CellAlignment() As Integer
' Attribute CellAlignment.VB_Description = "Returns/sets the alignment of data in a cell or range of selected cells. Not available at design time."
' Property CellBackColor() As Long
' Attribute CellBackColor.VB_Description = "Returns/sets the background and foreground colors of individual cells or ranges of cells."
' Property CellFontBold() As Boolean
' Attribute CellFontBold.VB_Description = "Returns or sets the bold style for the current cell text."
' Property CellFontItalic() As Boolean
' Attribute CellFontItalic.VB_Description = "Returns or sets the italic style for the current cell text."
' Property CellFontName() As String
' Attribute CellFontName.VB_Description = "Returns/sets the font to be used for individual cells or ranges of cells."
' Property CellFontSize() As Single
' Attribute CellFontSize.VB_Description = "Returns or sets the size, in points, for the current cell text."
' Property CellFontStrikeThrough() As Boolean
' Attribute CellFontStrikeThrough.VB_Description = "Returns or sets the strikethrough style for the current cell text."
' Property CellFontUnderline() As Boolean
' Attribute CellFontUnderline.VB_Description = "Returns or sets the underline style for the current cell text."
' Property CellFontWidth() As Single
' Attribute CellFontWidth.VB_Description = "Returns or sets the font width for the current cell text."
' Property CellForeColor() As Long
' Attribute CellForeColor.VB_Description = "Returns/sets the background and foreground colors of individual cells or ranges of cells."
' Property CellHeight() As Long
' Property CellLeft() As Long
' Property CellPicture() As Picture
' Attribute CellPicture.VB_Description = "Returns/sets an image to be displayed in the current cell or in a range of cells."
' Property CellPictureAlignment() As Integer
' Attribute CellPictureAlignment.VB_Description = "Returns/sets the alignment of pictures in a cell or range of selected cells. Not available at design time."
' Property CellTextStyle() As TextStyleSettings
' Attribute CellTextStyle.VB_Description = "Returns/sets 3D effects for text on a specific cell or range of cells."
' Property CellTop() As Long
' Property CellWidth() As Long
' Property ColAlignment(Index As Variant) As Integer
' Property ColAlignment(Index As Variant, ByVal New_ColAlignment As Integer)
' Attribute ColAlignment.VB_Description = "Returns/sets the alignment of data in a column. Not available at design time (except indirectly through the FormatString property)."
' Property ColData(Index As Variant) As Long
' Attribute ColData.VB_Description = "Array of long integer values with one item for each row (RowData) and for each column (ColData) of the FlexGrid. Not available at design time."
' Property ColIsVisible(Index As Variant) As Boolean
' Property ColPos(Index As Variant) As Long
' COLPOSITION is LET only (no GET)
' Property ColPosition(Index As Variant, ByVal New_ColPosition As Long)
' Property ColSel() As Long
' Attribute ColSel.VB_Description = "Determines the starting or ending row or column for a range of cells. Not available at design time."
' Property ColWidth(Index As Variant) As Long
' Attribute ColWidth.VB_Description = "Determines the width of the specified column in Twips. Not available at design time."
' Property DataBindings() As DataBindings
' Property DataSource() As IRowCursor
' Property Enabled() As Boolean
' Attribute Enabled.VB_Description = "Returns/sets a value that determines whether an object can respond to user-generated events."
' Property FillStyle() As FillStyleSettings
' Attribute FillStyle.VB_Description = "Determines whether setting the Text property or one of the Cell formatting properties of a FlexGrid applies the change to all selected cells."
' Property FixedAlignment(Index As Variant) As Integer
' Attribute FixedAlignment.VB_Description = "Returns/sets the alignment of data in the fixed cells of a column."
' Property FocusRect() As FocusRectSettings
' Attribute FocusRect.VB_Description = "Determines whether the FlexGrid control should draw a focus rectangle around the current cell."
' Property FontWidth() As Single
' Attribute FontWidth.VB_Description = "Returns or sets the width, in points, of the font to be used for text displayed."
' Property ForeColor() As OLE_COLOR
' Attribute ForeColor.VB_Description = "Determines the color used to draw text on each part of the FlexGrid."
' Property ForeColorFixed() As Long
' Attribute ForeColorFixed.VB_Description = "Determines the color used to draw text on each part of the FlexGrid."
' Property ForeColorSel() As Long
' Attribute ForeColorSel.VB_Description = "Determines the color used to draw text on each part of the FlexGrid."
' Property GridColor() As Long
' Attribute GridColor.VB_Description = "Returns/sets the color used to draw the lines between FlexGrid cells."
' Property GridColorFixed() As Long
' Attribute GridColorFixed.VB_Description = "Returns/sets the color used to draw the lines between FlexGrid cells."
' Property GridLines() As GridLineSettings
' Attribute GridLines.VB_Description = "Returns/sets the type of lines that should be drawn between cells."
' Property GridLinesFixed() As GridLineSettings
' Attribute GridLinesFixed.VB_Description = "Returns/sets the type of lines that should be drawn between cells."
' Property GridLineWidth() As Integer
' Attribute GridLineWidth.VB_Description = "Returns/sets the width in Pixels of the gridlines for the control."
' Attribute MergeCells.VB_Description = "Returns/sets whether cells with the same contents should be grouped in a single cell spanning multiple rows or columns."
' Property MergeCol(Index As Variant) As Boolean
' Attribute MergeCol.VB_Description = "Returns/sets which rows (columns) should have their contents merged when the MergeCells property is set to a value other than 0 - Never."
' Property MergeRow(Index As Variant) As Boolean
' Attribute MergeRow.VB_Description = "Returns/sets which rows (columns) should have their contents merged when the MergeCells property is set to a value other than 0 - Never."
' Property MouseCol() As Long
' Property Set MouseIcon(ByVal New_MouseIcon As Picture)
' Property MousePointer() As MousePointerSettings
' Attribute MousePointer.VB_Description = "Returns/sets the type of mouse pointer displayed when over part of an object."
' Property MouseRow() As Long
' Property NumberVBformatString as String
' Property Picture() As Picture
' Property Redraw() As Boolean
' Attribute Redraw.VB_Description = "Enables or disables redrawing of the FlexGrid control."
' Property RowData(Index As Variant) As Long
' Attribute RowData.VB_Description = "Array of long integer values with one item for each row (RowData) and for each column (ColData) of the FlexGrid. Not available at design time."
' Property RowHeight(Index As Variant) As Long
' Attribute RowHeight.VB_Description = "Returns/sets the height of the specified row in Twips. Not available at design time."
' Property RowHeightMin() As Long
' Attribute RowHeightMin.VB_Description = "Returns/sets a minimum row height for the entire control, in Twips."
' Property RowPos(Index As Variant) As Long
' ROWPOSITION is SET only (no GET)
' Property RowPosition(Index As Variant, ByVal New_RowPosition As Long)
' Property RowSel() As Long
' Attribute RowSel.VB_Description = "Determines the starting or ending row or column for a range of cells. Not available at design time."
' Property ScrollBars() As ScrollBarsSettings
' Attribute ScrollBars.VB_Description = "Returns/sets whether a FlexGrid has horizontal or vertical scroll bars."
' Property ScrollTrack() As Boolean
' Attribute ScrollTrack.VB_Description = "Returns/sets whether FlexGrid should scroll its contents while the user moves the scroll box along the scroll bars."
' SORT is SET only (no GET)
' Property Sort(ByVal New_Sort As Variant)
' Property TextStyle() As TextStyleSettings
' Attribute TextStyle.VB_Description = "Returns/sets 3D effects for displaying text."
' Property TextStyleFixed() As TextStyleSettings
' Attribute TextStyleFixed.VB_Description = "Returns/sets 3D effects for displaying text."
' Property ToolTipText() As String
' Attribute ToolTipText.VB_Description = "Returns/sets the text displayed when the mouse is paused over the control."
' Property Version() As Integer
' Attribute Version.VB_Description = "Returns the version of the FlexGrid control currently loaded in memory."
Event CellDataChange(theRow As Long, theCol As Long, PreChangeData As String, PostChangeData As String, SequenceNo As Long) 'MappingInfo=XXgrid,XXgrid,-1,CellDataChange
Public Sub ClearSS()
XXgrid.Clear
End Sub
Public Sub AutoSizeSS()
Dim i, j, lw As Double, lh As Double, gw As Double, gh As Double
'UserControl_Resize gets automatically called by changing these
DoEvents
End Sub
Private Sub UserControl_Initialize()
PreEditCellData = ""
EditSequenceNo = 0
pHaveRowTotals = False
pHaveColTotals = False
pNumberVBformatString = "###,###,###,##0.00"
End Sub
Public Sub InitializeSS(NRows As Variant, NCols As Variant, NFixedRows As Variant, NFixedCols As Variant, wantRowTotals As Variant, wantColTotals As Variant, NumberVBformatString As Variant, theFontName As Variant, theFontSize As Variant, theMSFlexGridFormatString As Variant)
Public Property Get NumberVBformatString() As String
NumberVBformatString = pNumberVBformatString
End Property
Public Property Let NumberVBformatString(New_NumberVBformatString As String)
pNumberVBformatString = New_NumberVBformatString
PropertyChanged "NumberVBformatString"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,AddItem
'Public Sub AddItem(Item As String, Optional Index As Variant)
Public Sub AddItem(Item As Variant, Optional Index As Variant)
XXgrid.AddItem Item, Index
End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,AllowBigSelection
Public Property Get AllowBigSelection() As Boolean
Attribute AllowBigSelection.VB_Description = "Returns/sets whether clicking on a column or row header should cause the entire column or row to be selected."
AllowBigSelection = XXgrid.AllowBigSelection
End Property
Public Property Let AllowBigSelection(ByVal New_AllowBigSelection As Boolean)
XXgrid.AllowBigSelection = New_AllowBigSelection
PropertyChanged "AllowBigSelection"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,AllowUserResizing
Public Property Get AllowUserResizing() As AllowUserResizeSettings
Attribute AllowUserResizing.VB_Description = "Returns/sets whether the user should be allowed to resize rows and columns with the mouse."
AllowUserResizing = XXgrid.AllowUserResizing
End Property
Public Property Let AllowUserResizing(ByVal New_AllowUserResizing As AllowUserResizeSettings)
XXgrid.AllowUserResizing = New_AllowUserResizing
PropertyChanged "AllowUserResizing"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,Appearance
Public Property Get Appearance() As AppearanceSettings
Attribute Appearance.VB_Description = "Returns/sets whether a control should be painted with 3-D effects."
Appearance = XXgrid.Appearance
End Property
Public Property Let Appearance(ByVal New_Appearance As AppearanceSettings)
XXgrid.Appearance = New_Appearance
PropertyChanged "Appearance"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,CellAlignment
Public Property Get CellAlignment() As Integer
Attribute CellAlignment.VB_Description = "Returns/sets the alignment of data in a cell or range of selected cells. Not available at design time."
CellAlignment = XXgrid.CellAlignment
End Property
Public Property Let CellAlignment(ByVal New_CellAlignment As Integer)
XXgrid.CellAlignment = New_CellAlignment
PropertyChanged "CellAlignment"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,CellBackColor
Public Property Get CellBackColor() As Long
Attribute CellBackColor.VB_Description = "Returns/sets the background and foreground colors of individual cells or ranges of cells."
CellBackColor = XXgrid.CellBackColor
End Property
Public Property Let CellBackColor(ByVal New_CellBackColor As Long)
XXgrid.CellBackColor = New_CellBackColor
PropertyChanged "CellBackColor"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,CellFontBold
Public Property Get CellFontBold() As Boolean
Attribute CellFontBold.VB_Description = "Returns or sets the bold style for the current cell text."
CellFontBold = XXgrid.CellFontBold
End Property
Public Property Let CellFontBold(ByVal New_CellFontBold As Boolean)
XXgrid.CellFontBold = New_CellFontBold
PropertyChanged "CellFontBold"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,CellFontItalic
Public Property Get CellFontItalic() As Boolean
Attribute CellFontItalic.VB_Description = "Returns or sets the italic style for the current cell text."
CellFontItalic = XXgrid.CellFontItalic
End Property
Public Property Let CellFontItalic(ByVal New_CellFontItalic As Boolean)
XXgrid.CellFontItalic = New_CellFontItalic
PropertyChanged "CellFontItalic"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,CellFontName
Public Property Get CellFontName() As String
Attribute CellFontName.VB_Description = "Returns/sets the font to be used for individual cells or ranges of cells."
CellFontName = XXgrid.CellFontName
End Property
Public Property Let CellFontName(ByVal New_CellFontName As String)
XXgrid.CellFontName = New_CellFontName
PropertyChanged "CellFontName"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,CellFontSize
Public Property Get CellFontSize() As Single
Attribute CellFontSize.VB_Description = "Returns or sets the size, in points, for the current cell text."
CellFontSize = XXgrid.CellFontSize
End Property
Public Property Let CellFontSize(ByVal New_CellFontSize As Single)
XXgrid.CellFontSize = New_CellFontSize
PropertyChanged "CellFontSize"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
Public Property Get CellPictureAlignment() As Integer
Attribute CellPictureAlignment.VB_Description = "Returns/sets the alignment of pictures in a cell or range of selected cells. Not available at design time."
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,CellTextStyle
Public Property Get CellTextStyle() As TextStyleSettings
Attribute CellTextStyle.VB_Description = "Returns/sets 3D effects for text on a specific cell or range of cells."
CellTextStyle = XXgrid.CellTextStyle
End Property
Public Property Let CellTextStyle(ByVal New_CellTextStyle As TextStyleSettings)
XXgrid.CellTextStyle = New_CellTextStyle
PropertyChanged "CellTextStyle"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,CellTop
Public Property Get CellTop() As Long
CellTop = XXgrid.CellTop
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,CellWidth
Public Property Get CellWidth() As Long
CellWidth = XXgrid.CellWidth
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,Col
Public Property Get Col() As Long
Attribute Col.VB_Description = "Returns/sets the active cell in a FlexGrid. Not available at design time."
Col = XXgrid.Col
End Property
Public Property Let Col(ByVal New_Col As Long)
XXgrid.Col = New_Col
PropertyChanged "Col"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ColAlignment
'Public Property Get ColAlignment(Index As Long) As Integer
Public Property Get ColAlignment(Index As Variant) As Integer
ColAlignment = XXgrid.ColAlignment(Index)
End Property
'Public Property Let ColAlignment(Index As Long, ByVal New_ColAlignment As Integer)
Public Property Let ColAlignment(Index As Variant, ByVal New_ColAlignment As Integer)
Attribute ColAlignment.VB_Description = "Returns/sets the alignment of data in a column. Not available at design time (except indirectly through the FormatString property)."
XXgrid.ColAlignment(Index) = New_ColAlignment
PropertyChanged "ColAlignment"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ColData
'Public Property Get ColData(Index As Long) As Long
Public Property Get ColData(Index As Variant) As Long
Attribute ColData.VB_Description = "Array of long integer values with one item for each row (RowData) and for each column (ColData) of the FlexGrid. Not available at design time."
ColData = XXgrid.ColData(Index)
End Property
'Public Property Let ColData(Index As Long, ByVal New_ColData As Long)
Public Property Let ColData(Index As Variant, ByVal New_ColData As Long)
XXgrid.ColData(Index) = New_ColData
PropertyChanged "ColData"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ColIsVisible
'Public Property Get ColIsVisible(Index As Long) As Boolean
Public Property Get ColIsVisible(Index As Variant) As Boolean
ColIsVisible = XXgrid.ColIsVisible(Index)
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ColPos
'Public Property Get ColPos(Index As Long) As Long
Public Property Get ColPos(Index As Variant) As Long
ColPos = XXgrid.ColPos(Index)
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ColPosition
'Public Property Get ColPosition(Index As Long) As Long
' ColPosition = XXgrid.ColPosition(Index)
'End Property
' COLPOSITION is LET only (no GET)
'Public Property Let ColPosition(Index As Long, ByVal New_ColPosition As Long)
Public Property Let ColPosition(Index As Variant, ByVal New_ColPosition As Long)
XXgrid.ColPosition(Index) = New_ColPosition
PropertyChanged "ColPosition"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,Cols
Public Property Get Cols() As Long
Attribute Cols.VB_Description = "Determines the total number of columns or rows in a FlexGrid."
Cols = XXgrid.Cols
End Property
Public Property Let Cols(ByVal New_Cols As Long)
XXgrid.Cols = New_Cols
PropertyChanged "Cols"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ColSel
Public Property Get ColSel() As Long
Attribute ColSel.VB_Description = "Determines the starting or ending row or column for a range of cells. Not available at design time."
ColSel = XXgrid.ColSel
End Property
Public Property Let ColSel(ByVal New_ColSel As Long)
XXgrid.ColSel = New_ColSel
PropertyChanged "ColSel"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ColWidth
'Public Property Get ColWidth(Index As Long) As Long
Public Property Get ColWidth(Index As Variant) As Long
ColWidth = XXgrid.ColWidth(Index)
End Property
'Public Property Let ColWidth(Index As Long, ByVal New_ColWidth As Long)
Public Property Let ColWidth(Index As Variant, ByVal New_ColWidth As Long)
Attribute ColWidth.VB_Description = "Determines the width of the specified column in Twips. Not available at design time."
XXgrid.ColWidth(Index) = New_ColWidth
PropertyChanged "ColWidth"
End Property
'Private Sub XXgrid_Compare(Row1 As Long, Row2 As Long, Cmp As Integer)
' RaiseEvent Compare(Row1, Row2, Cmp)
'End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,DataBindings
Public Property Get DataBindings() As DataBindings
Set DataBindings = XXgrid.DataBindings
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,DataSource
Public Property Get DataSource() As IRowCursor
Set DataSource = XXgrid.DataSource
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,Enabled
Public Property Get Enabled() As Boolean
Attribute Enabled.VB_Description = "Returns/sets a value that determines whether an object can respond to user-generated events."
Enabled = XXgrid.Enabled
End Property
Public Property Let Enabled(ByVal New_Enabled As Boolean)
XXgrid.Enabled = New_Enabled
PropertyChanged "Enabled"
End Property
Private Sub XXgrid_EnterCell()
If pHaveRowTotals And (XXgrid.Col >= XXgrid.Cols - 1) Then
XXgrid.Col = XXgrid.Col - 1
End If
If pHaveColTotals And (XXgrid.Row >= XXgrid.Rows - 1) Then
XXgrid.Row = XXgrid.Row - 1
End If
RaiseEvent EnterCell
End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,FillStyle
Public Property Get FillStyle() As FillStyleSettings
Attribute FillStyle.VB_Description = "Determines whether setting the Text property or one of the Cell formatting properties of a FlexGrid applies the change to all selected cells."
FillStyle = XXgrid.FillStyle
End Property
Public Property Let FillStyle(ByVal New_FillStyle As FillStyleSettings)
XXgrid.FillStyle = New_FillStyle
PropertyChanged "FillStyle"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,FixedAlignment
'Public Property Get FixedAlignment(Index As Long) As Integer
Public Property Get FixedAlignment(Index As Variant) As Integer
FixedAlignment = XXgrid.FixedAlignment(Index)
End Property
'Public Property Let FixedAlignment(Index As Long, ByVal New_FixedAlignment As Integer)
Public Property Let FixedAlignment(Index As Variant, ByVal New_FixedAlignment As Integer)
Attribute FixedAlignment.VB_Description = "Returns/sets the alignment of data in the fixed cells of a column."
XXgrid.FixedAlignment(Index) = New_FixedAlignment
PropertyChanged "FixedAlignment"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,FixedCols
Public Property Get FixedCols() As Long
Attribute FixedCols.VB_Description = "Returns/sets the total number of fixed (non-scrollable) columns or rows for a FlexGrid."
FixedCols = XXgrid.FixedCols
End Property
Public Property Let FixedCols(ByVal New_FixedCols As Long)
XXgrid.FixedCols = New_FixedCols
PropertyChanged "FixedCols"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,FixedRows
Public Property Get FixedRows() As Long
Attribute FixedRows.VB_Description = "Returns/sets the total number of fixed (non-scrollable) columns or rows for a FlexGrid."
FixedRows = XXgrid.FixedRows
End Property
Public Property Let FixedRows(ByVal New_FixedRows As Long)
XXgrid.FixedRows = New_FixedRows
PropertyChanged "FixedRows"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,FocusRect
Public Property Get FocusRect() As FocusRectSettings
Attribute FocusRect.VB_Description = "Determines whether the FlexGrid control should draw a focus rectangle around the current cell."
FocusRect = XXgrid.FocusRect
End Property
Public Property Let FocusRect(ByVal New_FocusRect As FocusRectSettings)
XXgrid.FocusRect = New_FocusRect
PropertyChanged "FocusRect"
End Property
Public Property Get Font() As Font
Attribute Font.VB_Description = "Returns/sets the default font or the font for individual cells."
Set Font = UserControl.Font
End Property
Public Property Set Font(ByVal New_Font As Font)
Set UserControl.Font = New_Font
Call SyncFonts
PropertyChanged "Font"
End Property
Private Sub SyncFonts()
Set XXgrid.Font = UserControl.Font
Set XXcellTextbox.Font = UserControl.Font
DoEvents
End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,FontWidth
Public Property Get FontWidth() As Single
Attribute FontWidth.VB_Description = "Returns or sets the width, in points, of the font to be used for text displayed."
FontWidth = XXgrid.FontWidth
End Property
Public Property Let FontWidth(ByVal New_FontWidth As Single)
XXgrid.FontWidth = New_FontWidth
PropertyChanged "FontWidth"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ForeColor
Public Property Get ForeColor() As OLE_COLOR
Attribute ForeColor.VB_Description = "Determines the color used to draw text on each part of the FlexGrid."
ForeColor = XXgrid.ForeColor
End Property
Public Property Let ForeColor(ByVal New_ForeColor As OLE_COLOR)
XXgrid.ForeColor = New_ForeColor
PropertyChanged "ForeColor"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ForeColorFixed
Public Property Get ForeColorFixed() As Long
Attribute ForeColorFixed.VB_Description = "Determines the color used to draw text on each part of the FlexGrid."
ForeColorFixed = XXgrid.ForeColorFixed
End Property
Public Property Let ForeColorFixed(ByVal New_ForeColorFixed As Long)
XXgrid.ForeColorFixed = New_ForeColorFixed
PropertyChanged "ForeColorFixed"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ForeColorSel
Public Property Get ForeColorSel() As Long
Attribute ForeColorSel.VB_Description = "Determines the color used to draw text on each part of the FlexGrid."
ForeColorSel = XXgrid.ForeColorSel
End Property
Public Property Let ForeColorSel(ByVal New_ForeColorSel As Long)
XXgrid.ForeColorSel = New_ForeColorSel
PropertyChanged "ForeColorSel"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,FormatString
Public Property Get FormatString() As String
Attribute FormatString.VB_Description = "Allows you to set up a FlexGrid's column widths, alignments, and fixed row and column text at design time. See the help file for details."
FormatString = XXgrid.FormatString
End Property
Public Property Let FormatString(ByVal New_FormatString As String)
XXgrid.FormatString = New_FormatString
PropertyChanged "FormatString"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,GridColor
Public Property Get GridColor() As Long
Attribute GridColor.VB_Description = "Returns/sets the color used to draw the lines between FlexGrid cells."
GridColor = XXgrid.GridColor
End Property
Public Property Let GridColor(ByVal New_GridColor As Long)
XXgrid.GridColor = New_GridColor
PropertyChanged "GridColor"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,GridColorFixed
Public Property Get GridColorFixed() As Long
Attribute GridColorFixed.VB_Description = "Returns/sets the color used to draw the lines between FlexGrid cells."
GridColorFixed = XXgrid.GridColorFixed
End Property
Public Property Let GridColorFixed(ByVal New_GridColorFixed As Long)
XXgrid.GridColorFixed = New_GridColorFixed
PropertyChanged "GridColorFixed"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,GridLines
Public Property Get GridLines() As GridLineSettings
Attribute GridLines.VB_Description = "Returns/sets the type of lines that should be drawn between cells."
GridLines = XXgrid.GridLines
End Property
Public Property Let GridLines(ByVal New_GridLines As GridLineSettings)
XXgrid.GridLines = New_GridLines
PropertyChanged "GridLines"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,GridLinesFixed
Public Property Get GridLinesFixed() As GridLineSettings
Attribute GridLinesFixed.VB_Description = "Returns/sets the type of lines that should be drawn between cells."
GridLinesFixed = XXgrid.GridLinesFixed
End Property
Public Property Let GridLinesFixed(ByVal New_GridLinesFixed As GridLineSettings)
XXgrid.GridLinesFixed = New_GridLinesFixed
PropertyChanged "GridLinesFixed"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,GridLineWidth
Public Property Get GridLineWidth() As Integer
Attribute GridLineWidth.VB_Description = "Returns/sets the width in Pixels of the gridlines for the control."
GridLineWidth = XXgrid.GridLineWidth
End Property
Public Property Let GridLineWidth(ByVal New_GridLineWidth As Integer)
XXgrid.GridLineWidth = New_GridLineWidth
PropertyChanged "GridLineWidth"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,HighLight
Public Property Get HighLight() As HighLightSettings
Public Property Let HighLight(ByVal New_HighLight As HighLightSettings)
XXgrid.HighLight = New_HighLight
PropertyChanged "HighLight"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,LeftCol
Public Property Get LeftCol() As Long
Attribute LeftCol.VB_Description = "Returns/sets the leftmost visible column (other than a fixed column) in the FlexGrid. Not available at design time."
LeftCol = XXgrid.LeftCol
End Property
Public Property Let LeftCol(ByVal New_LeftCol As Long)
XXgrid.LeftCol = New_LeftCol
PropertyChanged "LeftCol"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,MergeCells
Public Property Get MergeCells() As MergeCellsSettings
Attribute MergeCells.VB_Description = "Returns/sets whether cells with the same contents should be grouped in a single cell spanning multiple rows or columns."
MergeCells = XXgrid.MergeCells
End Property
Public Property Let MergeCells(ByVal New_MergeCells As MergeCellsSettings)
XXgrid.MergeCells = New_MergeCells
PropertyChanged "MergeCells"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,MergeCol
'Public Property Get MergeCol(Index As Long) As Boolean
Public Property Get MergeCol(Index As Variant) As Boolean
Attribute MergeCol.VB_Description = "Returns/sets which rows (columns) should have their contents merged when the MergeCells property is set to a value other than 0 - Never."
MergeCol = XXgrid.MergeCol(Index)
End Property
'Public Property Let MergeCol(Index As Long, ByVal New_MergeCol As Boolean)
Public Property Let MergeCol(Index As Variant, ByVal New_MergeCol As Boolean)
XXgrid.MergeCol(Index) = New_MergeCol
PropertyChanged "MergeCol"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,MergeRow
'Public Property Get MergeRow(Index As Long) As Boolean
Public Property Get MergeRow(Index As Variant) As Boolean
Attribute MergeRow.VB_Description = "Returns/sets which rows (columns) should have their contents merged when the MergeCells property is set to a value other than 0 - Never."
MergeRow = XXgrid.MergeRow(Index)
End Property
'Public Property Let MergeRow(Index As Long, ByVal New_MergeRow As Boolean)
Public Property Let MergeRow(Index As Variant, ByVal New_MergeRow As Boolean)
XXgrid.MergeRow(Index) = New_MergeRow
PropertyChanged "MergeRow"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,MouseCol
Public Property Get MouseCol() As Long
Set MouseIcon = XXgrid.MouseIcon
End Property
Public Property Set MouseIcon(ByVal New_MouseIcon As Picture)
Set XXgrid.MouseIcon = New_MouseIcon
PropertyChanged "MouseIcon"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,MousePointer
Public Property Get MousePointer() As MousePointerSettings
Attribute MousePointer.VB_Description = "Returns/sets the type of mouse pointer displayed when over part of an object."
MousePointer = XXgrid.MousePointer
End Property
Public Property Let MousePointer(ByVal New_MousePointer As MousePointerSettings)
XXgrid.MousePointer = New_MousePointer
PropertyChanged "MousePointer"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,MouseRow
Public Property Get MouseRow() As Long
MouseRow = XXgrid.MouseRow
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,Picture
Public Property Get Picture() As Picture
Set Picture = XXgrid.Picture
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,Redraw
Public Property Get Redraw() As Boolean
Attribute Redraw.VB_Description = "Enables or disables redrawing of the FlexGrid control."
Redraw = XXgrid.Redraw
End Property
Public Property Let Redraw(ByVal New_Redraw As Boolean)
XXgrid.Redraw = New_Redraw
PropertyChanged "Redraw"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,Refresh
Public Sub Refresh()
Attribute Refresh.VB_Description = "Forces a complete repaint of a form or control."
XXgrid.Refresh
End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,RemoveItem
'Public Sub RemoveItem(Index As Long)
Public Sub RemoveItem(Index As Variant)
XXgrid.RemoveItem Index
End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,Row
Public Property Get Row() As Long
Attribute Row.VB_Description = "Returns/sets the active cell in a FlexGrid. Not available at design time."
Row = XXgrid.Row
End Property
Public Property Let Row(ByVal New_Row As Long)
XXgrid.Row = New_Row
PropertyChanged "Row"
End Property
Private Sub XXgrid_RowColChange()
RaiseEvent RowColChange
End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,RowData
'Public Property Get RowData(Index As Long) As Long
Public Property Get RowData(Index As Variant) As Long
Attribute RowData.VB_Description = "Array of long integer values with one item for each row (RowData) and for each column (ColData) of the FlexGrid. Not available at design time."
RowData = XXgrid.RowData(Index)
End Property
'Public Property Let RowData(Index As Long, ByVal New_RowData As Long)
Public Property Let RowData(Index As Variant, ByVal New_RowData As Long)
XXgrid.RowData(Index) = New_RowData
PropertyChanged "RowData"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,RowHeight
'Public Property Get RowHeight(Index As Long) As Long
Public Property Get RowHeight(Index As Variant) As Long
Attribute RowHeight.VB_Description = "Returns/sets the height of the specified row in Twips. Not available at design time."
RowHeight = XXgrid.RowHeight(Index)
End Property
'Public Property Let RowHeight(Index As Long, ByVal New_RowHeight As Long)
Public Property Let RowHeight(Index As Variant, ByVal New_RowHeight As Long)
XXgrid.RowHeight(Index) = New_RowHeight
PropertyChanged "RowHeight"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,RowHeightMin
Public Property Get RowHeightMin() As Long
Attribute RowHeightMin.VB_Description = "Returns/sets a minimum row height for the entire control, in Twips."
RowHeightMin = XXgrid.RowHeightMin
End Property
Public Property Let RowHeightMin(ByVal New_RowHeightMin As Long)
XXgrid.RowHeightMin = New_RowHeightMin
PropertyChanged "RowHeightMin"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,RowIsVisible
'Public Property Get RowIsVisible(Index As Long) As Boolean
Public Property Get RowIsVisible(Index As Variant) As Boolean
RowIsVisible = XXgrid.RowIsVisible(Index)
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,RowPos
'Public Property Get RowPos(Index As Long) As Long
Public Property Get RowPos(Index As Variant) As Long
RowPos = XXgrid.RowPos(Index)
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,RowPosition
'Public Property Get RowPosition(Index As Long) As Long
' RowPosition = XXgrid.RowPosition(Index)
'End Property
' ROWPOSITION is SET only (no GET)
'Public Property Let RowPosition(Index As Long, ByVal New_RowPosition As Long)
Public Property Let RowPosition(Index As Variant, ByVal New_RowPosition As Long)
XXgrid.RowPosition(Index) = New_RowPosition
PropertyChanged "RowPosition"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,Rows
Public Property Get Rows() As Long
Attribute Rows.VB_Description = "Determines the total number of columns or rows in a FlexGrid."
Rows = XXgrid.Rows
End Property
Public Property Let Rows(ByVal New_Rows As Long)
XXgrid.Rows = New_Rows
PropertyChanged "Rows"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,RowSel
Public Property Get RowSel() As Long
Attribute RowSel.VB_Description = "Determines the starting or ending row or column for a range of cells. Not available at design time."
RowSel = XXgrid.RowSel
End Property
Public Property Let RowSel(ByVal New_RowSel As Long)
XXgrid.RowSel = New_RowSel
PropertyChanged "RowSel"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ScrollBars
Public Property Get ScrollBars() As ScrollBarsSettings
Attribute ScrollBars.VB_Description = "Returns/sets whether a FlexGrid has horizontal or vertical scroll bars."
ScrollBars = XXgrid.ScrollBars
End Property
Public Property Let ScrollBars(ByVal New_ScrollBars As ScrollBarsSettings)
XXgrid.ScrollBars = New_ScrollBars
PropertyChanged "ScrollBars"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=XXgrid,XXgrid,-1,ScrollTrack
Public Property Get ScrollTrack() As Boolean
Attribute ScrollTrack.VB_Description = "Returns/sets whether FlexGrid should scroll its contents while the user moves the scroll box along the scroll bars."
ScrollTrack = XXgrid.ScrollTrack
End Property
Public Property Let ScrollTrack(ByVal New_ScrollTrack As Boolean)
XXgrid.ScrollTrack = New_ScrollTrack
PropertyChanged "ScrollTrack"
End Property
Private Sub XXgrid_SelChange()
RaiseEvent SelChange
End Sub
''WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
''MappingInfo=XXgrid,XXgrid,-1,Text
Public Property Get Text() As String
Text = XXgrid.Text
End Property
Public Property Let Text(ByVal New_Text As String)
Dim old_text As String, proposed_text As String, the_row As Long, the_col As Long